<?php
namespace Admin\Controller;

class OtherController extends CommonController{
	
	public function _initialize(){
		parent::_initialize();
		if(IS_POST){
			$data = I('post.info');
			D(CONTROLLER_NAME)->create($data) || $this->error(D(CONTROLLER_NAME)->getError());
			$res = D(CONTROLLER_NAME)->saveData($data);
			$res === false ? $this->error('保存失败') : $this->success('保存成功',U('set_integral'));
		}else{
			$this->assign('info',D(CONTROLLER_NAME)->find());
		}
	}
    
}
?>